package dashboard
Import Path
github.com/K-Phoen/grabana/dashboard (on go.dev)
Dependency Relation
imports 12 packages, and imported by 2 packages
Package-Level Type Names (total 7)
Builder is the main builder used to configure dashboards.
Alerts returns all the alerts defined in this dashboard.
Internal.
MarshalIndentJSON renders the dashboard as indented JSON
which your configuration management tool of choice can then feed into
Grafana's dashboard via its provisioning support.
See https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards
MarshalJSON implements the encoding/json.Marshaler interface.
This method can be used to render the dashboard as JSON
which your configuration management tool of choice can then feed into
Grafana's dashboard via its provisioning support.
See https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards
*Builder : github.com/goccy/go-json.Marshaler
*Builder : encoding/json.Marshaler
func New(title string, options ...Option) (Builder, error)
func github.com/pancsta/asyncmachine-go/tools/generator.GenDashboard(p cli.GrafanaParams) (*Builder, error)
func github.com/K-Phoen/grabana.(*Client).UpsertDashboard(ctx context.Context, folder *grabana.Folder, builder Builder) (*grabana.Dashboard, error)
func github.com/pancsta/asyncmachine-go/tools/generator.SyncDashboard(ctx context.Context, p cli.GrafanaParams, builder *Builder) error
DashboardLink describes dashboard-level links to other dashboards.
See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/manage-dashboard-links/#dashboard-links
AsDropdown bool
IncludeTimeRange bool
IncludeVariableValues bool
OpenInNewTab bool
Tags []string
Title string
func DashboardLinks(links ...DashboardLink) Option
ExternalLink describes dashboard-level external link.
See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/manage-dashboard-links/#add-a-url-link-to-a-dashboard
Description string
Icon LinkIcon
IncludeTimeRange bool
IncludeVariableValues bool
OpenInNewTab bool
Title string
URL string
func ExternalLinks(links ...ExternalLink) Option
const IconBolt
const IconCloud
const IconDashboard
const IconDoc
const IconExternal
const IconInfo
const IconQuestion
Option represents an option that can be used to configure a
dashboard.
func AutoRefresh(interval string) Option
func DashboardLinks(links ...DashboardLink) Option
func DefaultTooltip() Option
func Editable() Option
func ExternalLinks(links ...ExternalLink) Option
func ID(id uint) Option
func ReadOnly() Option
func Row(title string, options ...row.Option) Option
func SharedCrossHair() Option
func Slug(slug string) Option
func Tags(tags []string) Option
func TagsAnnotation(annotation TagAnnotation) Option
func Time(from, to string) Option
func Timezone(timezone TimezoneOption) Option
func UID(uid string) Option
func VariableAsConst(name string, options ...constant.Option) Option
func VariableAsCustom(name string, options ...custom.Option) Option
func VariableAsDatasource(name string, options ...datasource.Option) Option
func VariableAsInterval(name string, options ...interval.Option) Option
func VariableAsQuery(name string, options ...query.Option) Option
func VariableAsText(name string, options ...text.Option) Option
func New(title string, options ...Option) (Builder, error)
TagAnnotation describes an annotation represented as a Tag.
See https://grafana.com/docs/grafana/latest/reference/annotations/#query-by-tag
Datasource string
IconColor string
Name string
Tags []string
func TagsAnnotation(annotation TagAnnotation) Option
TimezoneOption represents a possible value for the dashboard's timezone
configuration.
func Timezone(timezone TimezoneOption) Option
const Browser
const DefaultTimezone
const UTC
Package-Level Functions (total 22)
AutoRefresh defines the auto-refresh interval for the dashboard.
DashboardLinks adds a dashboard-level links to other dashboards.
See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/manage-dashboard-links/#dashboard-links
DefaultTooltip configures the graph tooltip NOT to be shared across panels.
Editable marks the dashboard as editable.
ExternalLinks adds a dashboard-level external links.
See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/manage-dashboard-links/#add-a-url-link-to-a-dashboard
ID sets the ID used by the dashboard.
New creates a new dashboard builder.
ReadOnly marks the dashboard as non-editable.
Row adds a row to the dashboard.
Slug sets the Slug used by the dashboard.
Tags adds the given set of tags to the dashboard.
TagsAnnotation adds a new source of annotation for the dashboard.
Time defines the default time range for the dashboard, e.g. from "now-6h" to
"now".
Timezone defines the default timezone for the dashboard, e.g. "utc".
UID sets the UID used by the dashboard.
VariableAsConst adds a templated variable, defined as a set of constant
values.
See https://grafana.com/docs/grafana/latest/reference/templating/#variable-types
VariableAsCustom adds a templated variable, defined as a set of custom
values.
See https://grafana.com/docs/grafana/latest/reference/templating/#variable-types
VariableAsDatasource adds a templated variable, defined as a datasource.
See https://grafana.com/docs/grafana/latest/variables/variable-types/add-data-source-variable/
VariableAsInterval adds a templated variable, defined as an interval.
See https://grafana.com/docs/grafana/latest/reference/templating/#variable-types
VariableAsQuery adds a templated variable, defined as a query.
See https://grafana.com/docs/grafana/latest/reference/templating/#variable-types
VariableAsText adds a templated variable, defined as a free text input.
See https://grafana.com/docs/grafana/latest/dashboards/variables/add-template-variables/#add-a-text-box-variable
Package-Level Constants (total 10)
Browser sets the dashboard's timezone to the browser's one.
DefaultTimezone sets the dashboard's timezone to the default one used by
Grafana.
const IconDashboard LinkIcon = "dashboard" const IconExternal LinkIcon = "external" const IconQuestion LinkIcon = "question"
UTC sets the dashboard's timezone to UTC.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |